
import { request } from "@/http/axios"
// 搜索三维模型
export function searchMilitaryDataApi(params: any) {
  return request({
    url: `/casia/resources/gjb/findPage${params.pageNum ? `?pageNum=${params.pageNum}` : ""}${params.pageSize ? `&pageSize=${params.pageSize}` : ""}`,
    method: "post",
    data: params
  })
}
// 添加三维模型
export function addMilitaryDataApi(data: any) {
  return request({
    url: `/casia/resources/gjb/save`,
    method: "post",
    data
  })
}
// 删除三维模型
export function deleteMilitaryDataApi(ids: string[]) {
  return request({
    url: `/casia/resources/gjb/delete`,
    method: "delete",
    data: {
      ids
    }
  })
}
// 更新三维模型
export function updateMilitaryDataApi(params: FormData) {
  return request({
    headers: {
      "Content-Type": "multipart/form-data"
    },
    url: `/casia/resources/gjb/update`,
    method: "post",
    data: params
  })
}
// 获取三维模型详情
export function getMilitaryDataDetailApi(id: any) {
  return request({
    url: `/casia/resources/gjb/findById`,
    method: "get",
    params:{
      id
    }
  })
}
